<template>

	<div id="YangSheng">
		<div v-for="medicine in tableData" style="width: 1000px;height: 200px;border:2px solid #FFFFFF;">
			<div id="left">
				<img :src="medicine.medicinePicture" width="180px" height="180px" alt style="border: 1px solid #42B983;position: absolute;margin-left: 20px;border-radius: 10px;margin-top: 10px;" />
			</div>
			<div style="position: absolute;margin-top: 120px; margin-left: -80px;">
				<div style="position: absolute;margin-top: -100px; margin-left: 300px;">
					<el-tag color="white" style="color: orangered;font-size: 15px;border: 0px;">药品名称:</el-tag>
					<el-input v-model="medicine.medicineName" :disabled="true" style="width: 300px;height: 20px;position: absolute;margin-left: 10px;margin-top:0px;font-size: 15px;"
					placeholder="药品名称">
					</el-input>
				</div>

				<div style="position: absolute;margin-top: -45px; margin-left: 300px;">
					<el-tag color="white" style="color: orangered;font-size: 15px;border: 0px;">药品数量:</el-tag>
					<el-input v-model="medicine.medicineNumber" :disabled="true" style="width: 100px;height: 20px;position: absolute;margin-top: -5px;margin-left: 10px;font-size: 13px;"
					placeholder="药品数量"></el-input>
				</div>

				<div style="position: absolute;margin-left: 300px;">
					<el-tag color="white" style="color: orangered;font-size: 30px;border: 0px;width: 80px;text-align: center;">¥</el-tag>
					<el-input v-model="medicine.medicineUnivalence" :disabled="true" style="width: 100px;height: 20px;position: absolute;margin-top: -5px;margin-left: 15px;font-size: 15px;"
					placeholder="药品价格"></el-input>
					<el-input-number v-model="num" @change="handleChange" :min="1" :max="100" label="描述文字" style="position:absolute;margin-left: 200px;margin-top: -50px;transform: scale(0.8);"></el-input-number>
				</div>
				<div>

					<el-button type="success" v-model="buy" style="position: absolute;margin-left: 690px;margin-top: 0px;transform: scale(0.6);">查看详情</el-button>
					<el-button type="success" v-model="buy" style="position: absolute;margin-left: 605px;margin-top: 0px;transform: scale(0.6);">加入购物车</el-button>
					<el-button type="success" v-model="buy" style="position: absolute;margin-left: 560px;margin-top: 0px;transform: scale(0.6);">购买</el-button>
				</div>




			</div>

		</div>

	</div>

</template>
<script>
	export default {
		props: ['newdrug'],
		data() {
			return {
				tableData: [{
					medicinePicture: '',
					medicineName: "",
					medicineUnivalence: "",
					medicineNumber: ""

				}],
				num: 1,
				medicineSort: ''

			}
		},
		mounted() {
			var that = this
			console.log(this.newdrug)
			this.$axios.post("http://localhost:8088/xiaoxiang/findAllMedicineSort", {
				medicineSort: this.newdrug
			}).then(function(response) {
				// console.log(response)
				that.tableData = response.data.data
				// eslint-disable-next-line no-unused-vars
			}).catch(function(error) {})
		},
		beforeRouteEnter: (to, from, next) => {
			next();
		}
	}
</script>

<style>
</style>
